The present invention relates to the field of mass-storage devices. More particularly, this invention relates to an improved fibre-channel arbitrated-loop (xe2x80x9cFC-ALxe2x80x9d) apparatus and method to method and apparatus for preserving loop fairness with a dynamic half-duplex mode of data transmission.
One key component of any computer system is a device to store data. Computer systems have many different devices where data can be stored. One common place for storing massive amounts of data in a computer system is on a disc drive. The most basic parts of a disc drive are a disc that is rotated, an actuator that moves a transducer to various locations over the disc, and circuitry that is used to write and read data to and from the disc. The disc drive also includes circuitry for encoding data so that it can be successfully retrieved from and written to the disc surface. A microprocessor controls most of the operations of the disc drive, in addition to passing the data back to the requesting computer and, taking data from a requesting computer for storing to the disc.
The interface for transferring data between the disc drive and the rest of the computer system is typically a bus or channel, such as the Small Computer Systems Interface (xe2x80x9cSCSIxe2x80x9d), or the Fibre Channel. Certain aspects of such interfaces are often standardized in order that various devices from different manufacturers can be interchanged and all can be connected to a common interface. Such standards are typically specified by some standards committee of an organization such as the American National Standards Institute (xe2x80x9cANSIxe2x80x9d).
One standardized interface for exchanging data between various storage devices and various computers is the fibre channel. In some embodiments, the fibre-channel standard includes arbitrated loops (described further below). In some embodiments, the fibre-channel standard supports a SCSI-like protocol for controlling data transfers.
Fibre channels represent significant advantages over Small Computer Standard Interface (xe2x80x9cSCSIxe2x80x9d) designs. Fibre channels provide significantly higher bandwidths, currently up to about 106 megabytes per second, compared to between two and twenty megabytes per second for traditional SCSI designs. Fibre channels provide greater connectivity in that up to one-hundred twenty-six devices (including the host) may be connected, as compared to a maximum of seven or fifteen devices in typical SCSI environments. The fibre channel can be attached with a single connector and does not require a switch. A fibre channel using coaxial electrical conductors operates at distances of up to thirty meters between devices, and up to ten kilometers using fibre optics for an entire channel, as compared to a maximum total length of up to twenty-five meters for SCSI environments.
In SCSI environments, errors in data transmission are detected through use of parity, whereas in fibre channels, errors are identified by a running disparity and cyclic-redundancy-code check (xe2x80x9cCRC checkxe2x80x9d) information. More information can be found in U.S. Pat. No. 5,802,080 entitled xe2x80x9cCRC Checking Using a CRC Generator in a Multi-port Design,xe2x80x9d and U.S. Pat. No. 5,663,724 entitled xe2x80x9c16B/20B Encoder,xe2x80x9d both by the present inventor, Westby, and commonly assigned to the present assignee Seagate Technology, Inc.
The fibre-channel arbitrated loop (xe2x80x9cFC-ALxe2x80x9d) is an industry-standard system employing a byte-oriented DC-balanced (0,4) run-length-limited 8B/10B-partitioned block-transmission code scheme. The FC-AL operates at a clock frequency of 106.25 MHZ. One form of an 8B/10B encoder/decoder is described in U.S. Pat. No. 4,486,739 granted Dec. 4, 1984 for xe2x80x9cByte Oriented DC Balanced (0,4) 8B/10B Partitioned Block Transmission Codexe2x80x9d by Franaszek et al.
A fibre-channel arbitrated loop (xe2x80x9cFC-ALxe2x80x9d) allows for multiple devices, each called xe2x80x9ca node,xe2x80x9d to be connected together. A node may be any device (a computer, workstation, printer, disc drive, scanner, etc.) of the computer system having an interface allowing it to be connected to a fibre-channel xe2x80x9ctopologyxe2x80x9d (defined just below). Each node has at least one port, called an NL port (xe2x80x9cnode-loop portxe2x80x9d) to provide access to other nodes. The components that connect two or more ports together are collectively called a xe2x80x9ctopologyxe2x80x9d or a xe2x80x9cloop.xe2x80x9d Each node communicates with all other nodes within the provided topology or loop.
Ports are the connections in a fibre-channel node, though which data may pass over the fibre channel to ports of other nodes (the outside world). A typical fibre-channel drive has two ports packaged within the drive""s node. Each port includes a pair of xe2x80x9cfibersxe2x80x9dxe2x80x94one to carry information into the port and one to carry information out of the port. Each xe2x80x9cfiberxe2x80x9d is a serial data connection, and, in one embodiment, each fiber is actually a coaxial wire (e.g., coaxial copper conductors, used when the nodes are in close proximity to one another); in other embodiments, a fiber is implemented as an optical fiber for at least some of its path (e.g., when nodes are separated by an appreciable distance, such as nodes in different cabinets or, especially, different buildings). The pair of fibers connected to each port (one carrying data into the port, the other carrying data out from the port) is called a xe2x80x9clinkxe2x80x9d and is part of each topology. Links carry information or signals packaged in xe2x80x9cframesxe2x80x9d between nodes. Each link can handle multiple types of flames (e.g., initialization, data, and control frames).
Since each fiber carries data in-one direction only, nodes are connected to one another along a loop, wherein the nodes must arbitrate for control of the loop when they have data to transfer. xe2x80x9cArbitrationxe2x80x9d is the process of coordinating the nodes to determine which one has control of the loop. Fibre-channel arbitrated loops attach multiple nodes in the loop without hubs or switches. The node ports use arbitration operations to establish a point-to-point data-transfer circuit. FC-AL is a distributed topology where each port includes at least the minimum necessary function to establish the circuit. The arbitrated-loop topology is used to connect any number of nodes between two and one-hundred twenty-six (126) node ports.
In some embodiments, each node includes dual ports (each connected to a separate loop) which provide redundancy, so that if one loop fails, the other one can fulfill the loop duties. Dual ports also allow two hosts (e.g., two host computers) to share a single drive.
xe2x80x9cFairnessxe2x80x9d in the context of the present invention is a mode of operation wherein a shared resource, such as a Fibre Channel loop, is made available on a timely basis to each of a plurality of users, such as to each of a plurality of disc drives 100; i.e., without undue delay, and for an amount of time proportional to the amount of data each disc drive 100 needs to transfer. xe2x80x9cPlaying unfairxe2x80x9d is a mode of operation wherein one user, for example one disc drive, will take control of the shared resource, for example the Fibre Channel loop, either too often or for too long a period of time, thus depriving other disc drives that need to use the loop of its use.
xe2x80x9cFairnessxe2x80x9d allows each port to gain access to the loop (based on priority) and transmit as much information as it wants (no time limit). It must then wait to arbitrate gain until all other ports have used their access.
The protocol for the Loop permits each L Port (also called a loop port; an L_Port can be either a normal loop port xe2x80x9cNL_Portxe2x80x9d or a fabric-loop port xe2x80x9cFL_Portxe2x80x9d that is used generally to interconnect two loops to one another) to continuously arbitrate to access the Loop. A priority is assigned to each participating L-port based on the Arbitrated Loop Physical Address (AL_PA). As with other prioritized protocols, this could lead to situations where the lower priority L_Ports cannot gain access to the Loop. The access fairness algorithm sets up an access window in which all L_Ports are given an opportunity to arbitrate and win access to the Loop. When all L_Ports have had an opportunity to access the Loop once, a new access window is started. An L_Port may arbitrate again and eventually win access to the Loop in the new access window. Not every L_Port is required to access the Loop in any one access window.
When an L_Port which uses the access fairness algorithm has arbitrated for and won access to the Loop, the L_Port shall not arbitrate again until at least one Idle has been transmitted by the L_Port. The time between the first L_Port to win arbitration and transmitting an Idle is an access window. A special arbitration Primitive Signal (i.e., ARB(F0)) is used to prevent an early reset of the access window. The details of the access fairness algorithm are contained in the Fibre-Channel FC-AL Specification (ANSI Standards: Fibre Channel FC-AL X3T11/Project 960D/Rev. 4.5 and Fibre Channel FC-AL2 X3T11/Project 1133D/Rev. 6.3).
The access fairness algorithm does not limit the time that an L_Port controls the Loop once it wins arbitration, just as ANSI X3.230, FC-PH does not limit the time for a Class 1connection. However, if access is denied longer than E_D_TOV, the access window is reset and an L_Port may begin arbitrating.
Although all L_Ports shall implement the fairness algorithm, neither FL_Ports nor NL_Ports are required to use the fairness algorithm at all times. For example, if one L_Port requires more Loop accesses than the other L_Ports, that L_Port may choose to be unfair.
To provide equal access to the Loop for all L_Ports, it is recommended that each L Port use the access fairness algorithm. When an L_Port is using the access fairness algorithm, it is called a xe2x80x9cfairxe2x80x9d L_Port.
When a fair L_Port has arbitrated for and won access to the Loop and does not detect that another L_Port is arbitrating, that L_Port may keep the existing circuit open indefinitely or close that circuit and retain ownership of the Loop (i.e., without re-arbitrating) to open another L_Port on the Loop.
When a fair L_Port has access to the Loop and detects that another L_Port is arbitrating, the L_Port may close the Loop at the earliest possible time. The L_Port shall close the Loop and arbitrate again in the-next access window before opening a different L_Port.
The configuration of some Loops may require that certain L_Ports have more access to the Loop than just once per access window. Examples of these L_Ports include, but are not limited to, a subsystem controller or a file server.
An L_Port may be initialized (or may temporarily choose) not to use the access fairness algorithm. When an L_Port is not using the fairness algorithm, it is called an xe2x80x9cunfairxe2x80x9d L_Port. The decision whether to participate in access fairness is left to the needs of the implementation.
When an unfair L_Port has arbitrated for and won access to the Loop and does not detect that another L_Port is arbitrating, that L_Port may keep the existing circuit open indefinitely or close that circuit and retain ownership of the Loop (i.e., without re-arbitrating) to open another L_Port on the Loop.
When an unfair L_Port controls the Loop and detects that another L_Port is arbitrating, the unfair L_Port may close the Loop at the earliest possible time. The unfair L_Port may retain ownership of the Loop (i.e., without re-arbitrating) and open another L_Port on the Loop.
A participating FL_Port is always the highest priority L_Port on the Loop based on its AL_PA. An FL_Port is exempted from using access fairness algorithm because the majority of its traffic is with the rest of the Fabric.
When an FL_Port controls the Loop and detects that another NL_Port is arbitrating, the FL_Port may close the Loop at the earliest possible time. Because the FL_Port has the highest priority and is exempted from fairness, it will always win arbitration. Therefore, if communication is required with another NL_Port, the FL_Port may retain its access to the Loop (i.e., without re-arbitrating) and open another NL_Port on the Loop.
There is, therefore, a need for an arrangement to preserve loop fairness, particularly in fibre-channel embodiments that include a dynamic half-duplex feature.
A method and apparatus is described for preserving loop fairness. Some embodiments include a dynamic half-duplex feature. One aspect of the present invention includes a communications channel system for preserving loop fairness that includes a first channel node having one or more ports, each port supporting and attached to a fibre-channel arbitrated-loop serial communications channel. One of the ports will arbitrate for control of that port""s attached channel, wherein control of the channel loop, once arbitration is won, a fairness-preserving apparatus causes control of the communications channel to be released based at least in part on whether a predetermined amount of use has occurred between the first port and the communications channel.
Another aspect of the present invention provides a communications method that includes arbitrating for control of a loop of a fibre-channel arbitrated-loop serial communications channel; and releasing control of the communications channel based at least in part on whether a predetermined amount of use has occurred between the first port and the communications channel.
In some embodiments of the above system and method, the predetermined amount of use includes a transfer of a first predetermined amount of data. In some such embodiments, release of control of the channel is inhibited if less than a second predetermined amount of data remains to be transferred.